# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=mauikit
pkgver=1.1.1
pkgrel=0
pkgdesc="Kit for developing MAUI Apps"
arch="all !armhf" # armhf blocked by qt5-qtdeclarative
url="https://invent.kde.org/kde/mauikit"
license="GPL-2.0-or-later"
depends="kirigami2"
depends_dev="qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtsvg-dev qt5-qtquickcontrols2-dev ki18n-dev knotifications-dev kconfig-dev kservice-dev kio-dev syntax-highlighting-dev kconfigwidgets-dev kdecoration-dev kdeclarative-dev plasma-framework-dev"
makedepends="$depends_dev extra-cmake-modules"
source="https://invent.kde.org/maui/mauikit/-/archive/v$pkgver/mauikit-v$pkgver.tar.gz"
subpackages="$pkgname-dev"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="546bc3e150008278c4fcbd77050a040cba5c50754bbe9e5fd0c9db25e4db43d3265e05d5b4935746c3535c6c80fe9fb6453d11b913dd0d2b7e8c7afc40371e6c  mauikit-v1.1.1.tar.gz"
